﻿// <copyright file="NoErrorPageSpecifiedException.cs" company="Barry Dorrans">
// Copyright (c) 2008 All Right Reserved, Barry Dorrans
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-12-03</date>
// <summary>The exception that is thrown when the configuration states redirection should happen but no error page is specified.</summary>

namespace Idunno.AntiCsrf
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// The exception that is thrown when the configuration states redirection should happen but no error page is specified.
    /// </summary>
    [Serializable]
    public class NoErrorPageSpecifiedException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="NoErrorPageSpecifiedException"/> class.
        /// </summary>
        public NoErrorPageSpecifiedException()
        {           
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="NoErrorPageSpecifiedException"/> class with a specified error message 
        /// and a reference to the inner exception that is the cause of this exception. 
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public NoErrorPageSpecifiedException(string message) : base(message)
        {            
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="NoErrorPageSpecifiedException"/> class with a specified error message.
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        /// <param name="innerException">The exception that is the cause of the current exception, or a null reference 
        /// (Nothing in Visual Basic) if no inner exception is specified.</param>
        public NoErrorPageSpecifiedException(string message, Exception innerException) : base(message, innerException)
        {            
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="NoErrorPageSpecifiedException"/> class with serialized data.
        /// </summary>
        /// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
        /// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
        protected NoErrorPageSpecifiedException(SerializationInfo info, StreamingContext context) : base(info, context)
        {            
        }
    }
}
